import request from "@/utils/request";

// 查询护理项目列表
export function listItem(query) {
  return request({
    url: "/service/item/list",
    method: "get",
    params: query,
  });
}

// 查询护理项目详细 根据id查询指定项目
export function getItem(id) {
  return request({
    url: "/service/item/" + id,
    method: "get",
  });
}

//查询与护理计划相关的护理项目id
export function getRelItemIds() {
  return request({
    url: "/service/item/relation",
    method: "get",
  });
}

// 新增护理项目
export function addItem(data) {
  return request({
    url: "/service/item",
    method: "post",
    data: data,
  });
}

// 修改护理项目
export function updateItem(data) {
  return request({
    url: "/service/item",
    method: "put",
    data: data,
  });
}

// 删除护理项目 根据id删除指定护理项目
export function delItem(id) {
  return request({
    url: "/service/item/" + id,
    method: "delete",
  });
}
